package org.example.springboot137.entity;

import java.io.Serializable;
import java.util.List;

public class PageBase<T> implements Serializable {
    private int pageSize;//每页显示数
    private int pageCode;//当前页数
    private int totalCount;//总行数
    private List<T> list;//内容
    private int count;
    //总页数


    public int getCount() {
        return  totalCount%pageSize==0?totalCount/pageSize:(totalCount/pageSize)+1;
    }

    public void setCount(int count) {
        this.count =  totalCount%pageSize==0?totalCount/pageSize:(totalCount/pageSize)+1;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageCode() {
        return pageCode;
    }

    public void setPageCode(int pageCode) {
        this.pageCode = pageCode;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
